<%@page contentType="text/javascript;charset=GBK" language="java"%>
<%@page import="com.tensosoft.cms.colmgr.ColContext,com.tensosoft.cms.colmgr.ColTree"%><%
com.tansuosoft.discoverx.web.JSPContext jspContext=new com.tansuosoft.discoverx.web.JSPContext(pageContext);
jspContext.setNoCache();
String unid=request.getParameter("unid");
String alias=request.getParameter("alias");
String punid=request.getParameter("punid");
ColTree root=ColContext.getInstance().getRoot();
ColTree p=ColContext.findTree(root,punid);
if(p==null) p=root;
boolean isAliasOk=true;
if(p.hasChildren()){
	for(ColTree x:p.getChildren()){
		if(x==null) continue;
		if(x.getAlias().equalsIgnoreCase(alias) && !x.getUnid().equalsIgnoreCase(unid)){
			isAliasOk=false;
			break;
		}
	}
}
%>{status:<%=isAliasOk?"0":"-1"%>,message:''}
